/*
 * Copyright 2007-2009 Perttu "celeron55" Ahola <celeron55@gmail.com>
 *
 * This file is part of jukumagic.
 *
 * jukumagic is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * jukumagic is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with jukumagic.  If not, see <http://www.gnu.org/licenses/>.
*/

#include "xml.h"

Xml::Xml(TiXmlElement *element) : m_element(*element)
{
	std::cout<<"Xml: "<<element->Value()<<std::endl;
}

Xml::~Xml()
{
	std::cout<<"~Xml"<<std::endl;
}

void Xml::WriteXML(TiXmlNode* root)
{
	TiXmlElement *element = new TiXmlElement(m_element);
	root->LinkEndChild(element);
	WriteBaseXML(element);
}

JukuObject* Xml::ReadFromXMLElement(TiXmlElement* element)
{
	Xml *xml = new Xml(element);

	return xml;
}

